#define _CRT_SECURE_NO_WARNINGS 1
#pragma once 
#include"RBTree.h"
 namespace vic
 {
	 template<class K>
	 class set
	 {
		 struct SetKeyOfT
		 {
			 const K& operator()(const K& key)
			 {
				 return key;
			 }
		 };
	 public:
		 typedef typename RBTree<K, K, SetKeyOfT>::iterator iterator;

		 iterator begin()
		 {
			 return _t.begin();
		 }

		 iterator end()
		 {
			 return _t.end();
		 }
		 pair<iterator,bool> insert(const K& key)
		 {
			 return _t.Insert(key);
		 }
	 private:
		 RBTree<K, K, SetKeyOfT> _t;
	 };




	 void testset1()
	 {
		 set<int> s;
		 s.insert(1);
		 s.insert(2);
		 s.insert(3);
		 set<int>::iterator it = s.begin();
		 while (it != s.end())
		 {
			 cout << *it << " ";
			 ++it;
		 }

	 }

 }